home *** CD-ROM | disk | FTP | other *** search
Text File | 2000-01-31 | 847 b | 37 lines | [TEXT/ToyS] |
- on adding folder items to theFolder after receiving addedItems
-
- -- name of catalog file
- set myCatalog to (theFolder as text) & ".catalog"
-
- -- check if we already have a catalog
- tell application "Finder"
- set fileExists to exists alias (myCatalog)
- end tell
-
- -- confirm
- display dialog "Insert items in '.catalog'" -- & (myCatalog as text) & "'"
-
- tell application "iView Multimedia"
- activate
-
- -- if catalog exists we insert new items, otherwise we insert entire folder
- if fileExists = true then
- open file myCatalog
- open addedItems
- else
- open theFolder
- end if
-
- -- wait until importing is done
- repeat while the «class pImp» of window 1 is true
- end repeat
-
- -- save catalog
- if fileExists = true then
- save window 1
- else
- save window 1 in file myCatalog
- end if
- end tell
-
- end adding folder items to